package com.college.collegeinfomanage.controller;

import com.college.collegeinfomanage.service.DashboardService;
import com.college.collegeinfomanage.util.Result;
import com.college.collegeinfomanage.vo.DashboardVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Controller
@RestController
@RequestMapping("/dashboard")
public class DashboardController {

    @Resource
    private DashboardService dashboardService;

    @GetMapping("/summary")
    public Result summary(){
        DashboardVO dashboardVO = dashboardService.summary();
        return Result.success(dashboardVO);
    }
}
